Benjamin Otte [Mon, 11 Apr 2011 17:55:34 +0000 (19:55 +0200)]
cssprovider: Add a load_internal function that all loads chain to
Benjamin Otte [Mon, 11 Apr 2011 15:57:50 +0000 (17:57 +0200)]
tests: Order files by name before adding them as tests
Ensures that the order of tests is not dependant on your hard disk.
Benjamin Otte [Mon, 11 Apr 2011 15:30:01 +0000 (17:30 +0200)]
cssprovider: Keep base url in the scanner
And provide a nice function to query it. Simplifies a bunch of code.
Benjamin Otte [Mon, 11 Apr 2011 14:48:00 +0000 (16:48 +0200)]
cssprovider: Move properties to scanner constructor
So we can set them in one place.
Benjamin Otte [Mon, 11 Apr 2011 01:14:23 +0000 (03:14 +0200)]
cssprovider: Don't store scanner in the struct
Instead, create scanners whenever we actually parse stuff.
Benjamin Otte [Mon, 11 Apr 2011 00:37:24 +0000 (02:37 +0200)]
cssprovider: Get rid of gtk_css_provider_reset_parser()
Instead call gtk_css_scanner_reset(). There is nothing else we could
need to do.
Benjamin Otte [Mon, 11 Apr 2011 00:32:26 +0000 (02:32 +0200)]
cssprovider: Keep track of passed in error differently
Instead of having an error member in the CSS provider's private struct,
connect a signal handler when an error is passed in. This has two
advantages:
1) It makes the code clearer as we don't have to keep track of an error
member anywhere.
2) It causes a non-emission of the g_warning() when an error was passed
in, because it only triggers when no signal handlers are connected.
So we get identical behavior to GTK 3.0 where warnings where only
emitted when no error was passed in.
Benjamin Otte [Mon, 11 Apr 2011 00:18:21 +0000 (02:18 +0200)]
cssprovider: Do error handling differently
Instead of aborting a parse whenever we encounter an error, parse to the
end. But if a GError was passed in, reset the provider completely as if
nothing had been parsed.
Benjamin Otte [Sun, 10 Apr 2011 23:51:49 +0000 (01:51 +0200)]
cssprovider: Emit a g_warning() when a css file is erroneous
... and no other error handler is active. See the source code comment
for the reasoning.
Benjamin Otte [Sun, 10 Apr 2011 23:33:26 +0000 (01:33 +0200)]
cssprovider: No need to restore after @import parsing
With the recent changes, this just resets the error, and we don't the
error reset from subfile parsing.
Benjamin Otte [Sun, 10 Apr 2011 23:28:00 +0000 (01:28 +0200)]
cssprovider: Store current properties and selectors in scanner
They don't belong in the css provider
Benjamin Otte [Sun, 10 Apr 2011 23:25:27 +0000 (01:25 +0200)]
cssprovider: Use scanner variable instead of priv->scanner
Benjamin Otte [Sun, 10 Apr 2011 13:22:07 +0000 (15:22 +0200)]
cssprovider: Pass scanner argument explicitly to error functions
Benjamin Otte [Sun, 10 Apr 2011 02:51:55 +0000 (04:51 +0200)]
cssprovider: Update the scope modifying functions
Make them take the scanner as an argument, as that's what gets changed,
not the CssProvider.
Benjamin Otte [Sun, 10 Apr 2011 01:51:43 +0000 (03:51 +0200)]
cssprovider: track state in the scanner
This way, we don't have to do magic copies when we create a new scanner
for a subfile.
Benjamin Otte [Sun, 10 Apr 2011 01:39:52 +0000 (03:39 +0200)]
cssprovider: Add a private structure to the scanner
So far, it's unused
Benjamin Otte [Sun, 10 Apr 2011 01:35:19 +0000 (03:35 +0200)]
cssprovider: Add a custom gtk_css_scanner_destroy() function
So far, it does nothing
Benjamin Otte [Sun, 10 Apr 2011 01:16:04 +0000 (03:16 +0200)]
cssprovider: Pass the scanner explicitly to parse_stylesheet()
This is the first step in decoupling the scanner from the provider.
Benjamin Otte [Sun, 10 Apr 2011 00:20:17 +0000 (02:20 +0200)]
cssprovider: No need to set user data anymore
Benjamin Otte [Sat, 9 Apr 2011 23:53:43 +0000 (01:53 +0200)]
tests: Make css-parser test take files as argument
Takes the css files to be tested as argument and runs with it.
Benjamin Otte [Sat, 9 Apr 2011 23:53:31 +0000 (01:53 +0200)]
tests: Add a test for border parsing
Benjamin Otte [Sat, 9 Apr 2011 23:52:58 +0000 (01:52 +0200)]
tests: Add new test checking weird behavior for declarations
Benjamin Otte [Sat, 9 Apr 2011 23:48:55 +0000 (01:48 +0200)]
cssprovider: Clean up declaration parser to conform to more tests
The tests will follow with the next commits
Benjamin Otte [Sat, 9 Apr 2011 16:18:02 +0000 (18:18 +0200)]
cssprovider: Rework declaration parsing loop
The new loop can cope better with invalid identifiers and manages to
resume parsing properly.
Benjamin Otte [Sat, 9 Apr 2011 11:49:41 +0000 (13:49 +0200)]
tests: Add CSS integer parsing tests
Benjamin Otte [Sat, 9 Apr 2011 11:48:45 +0000 (13:48 +0200)]
tests: Add test for booleans to CSS tests
Benjamin Otte [Fri, 8 Apr 2011 15:17:27 +0000 (17:17 +0200)]
cssprovider: Don't fail with invalid syntax when parsing a value
Instead, raise a PROPERTY_VALUE error, find the next semicolon or
closing bracket and resume parsing.
Benjamin Otte [Fri, 8 Apr 2011 14:59:17 +0000 (16:59 +0200)]
tests: (Try to) print the actual enum value in the errors file
Instead of gtk-some-error-quark 5, print
GTK_SOME_ERROR_SOMETHING_FAILED.
Benjamin Otte [Fri, 8 Apr 2011 14:42:04 +0000 (16:42 +0200)]
test: Add a bunch of default properties to the CSS parser
One of each type, so that we can test the parsing of them.
Benjamin Otte [Fri, 8 Apr 2011 14:08:28 +0000 (16:08 +0200)]
css: Overhaul value parsing
Value parsing only sometimes emitted errors. Sometimes it didn't emit
errors but ignored the value, sometimes it took a default, sometimes it
converted it to something it deemed suitable.
While refactoring, I moved the whole GValue <=> char * conversion
routines to a separate file, to make navigating the core css provider
easier.
Benjamin Otte [Fri, 8 Apr 2011 00:57:33 +0000 (02:57 +0200)]
cssprovider: Remove now useless variables
Benjamin Otte [Fri, 8 Apr 2011 00:41:15 +0000 (02:41 +0200)]
cssprovider: Remove scanner_report_warning() function
That function does superbad stuff just to print out something on stderr.
Don't do superbad stuff.
Benjamin Otte [Fri, 8 Apr 2011 14:12:35 +0000 (16:12 +0200)]
tests: Make CSS parser pass NULL as error.
We are trapping errors via signals now.
Benjamin Otte [Thu, 7 Apr 2011 23:32:13 +0000 (01:32 +0200)]
tests: Check errors in css test
Benjamin Otte [Thu, 7 Apr 2011 22:50:32 +0000 (00:50 +0200)]
tests: Change the way the code does diffs
Use a temp file for intermediate storage and properly unlink that
tempfile after the diff is done.
Benjamin Otte [Thu, 7 Apr 2011 22:18:38 +0000 (00:18 +0200)]
cssprovider: use INVALID_SYNTAX for unexpected token error
Benjamin Otte [Thu, 7 Apr 2011 22:08:10 +0000 (00:08 +0200)]
cssprovider: Change declaration parsing for error reporting
Previously, we only checked for errors after parsing the full
declaration. Now we detect errors with the property before even
attempting to parse its value.
The benefit here is that the error reporting reports the correct line
and position numbers.
Benjamin Otte [Thu, 7 Apr 2011 22:07:55 +0000 (00:07 +0200)]
API: cssprovider: Add more error codes
Benjamin Otte [Thu, 7 Apr 2011 15:26:47 +0000 (17:26 +0200)]
API: cssprovider: Make error a signal
Benjamin Otte [Thu, 7 Apr 2011 12:03:08 +0000 (14:03 +0200)]
cssprovider: Handle errors completely via new error functions
Benjamin Otte [Thu, 7 Apr 2011 11:37:03 +0000 (13:37 +0200)]
cssprovider: Provide better API to set errors
Benjamin Otte [Thu, 7 Apr 2011 10:38:53 +0000 (12:38 +0200)]
cssprovider: Have a private error variable
Benjamin Otte [Thu, 7 Apr 2011 10:20:22 +0000 (12:20 +0200)]
tests: Add test for auto-closing at end of file
Benjamin Otte [Thu, 7 Apr 2011 10:19:07 +0000 (12:19 +0200)]
cssprovider: Automatically add final closing bracket to last rule
Benjamin Otte [Thu, 7 Apr 2011 10:14:58 +0000 (12:14 +0200)]
tests: Add CSS test checking that we don't need a semicolon
Benjamin Otte [Thu, 7 Apr 2011 00:24:51 +0000 (02:24 +0200)]
tests: Add two simple css tests
Benjamin Otte [Thu, 7 Apr 2011 00:15:42 +0000 (02:15 +0200)]
tests: Add a test for the CSS parser
Tests in the parser need 1 or 2 files:
1) test.css
2) test.ref.css (optional, defaults to test.css)
The test instantiates a CSS provider, loads test.css, then dumps the
loaded file to test.out.css and then checks that that file matches
test.ref.css. If not, it dumps a diff between those two to the log and
fails.
You want to run the test with --verbose to get the output dumped to
stdout.
Benjamin Otte [Thu, 7 Apr 2011 00:15:02 +0000 (02:15 +0200)]
cssprovider: Ignore empty rules
Benjamin Otte [Wed, 6 Apr 2011 20:03:35 +0000 (22:03 +0200)]
API: gtk: Add gtk_css_provider_to_string()
This is intented to convert the contents of a CSS provider back to a
string.
It is not complete yet but good enough for starting a testsuite. :)
Benjamin Otte [Mon, 11 Apr 2011 16:38:22 +0000 (18:38 +0200)]
API: Add gtk_gradient_to_string()
Benjamin Otte [Wed, 6 Apr 2011 19:42:21 +0000 (21:42 +0200)]
gtk: Add _gtk_animation_description_to_string()
Reverses _gtk_animation_description_from_string()
Benjamin Otte [Wed, 6 Apr 2011 19:41:42 +0000 (21:41 +0200)]
API: gtk: Add gtk_symbolic_color_to_string()
See future commits for why this is useful. Or try to debug some color
problem.
Benjamin Otte [Wed, 6 Apr 2011 13:38:06 +0000 (15:38 +0200)]
cssprovider: Add a function for signalling errors
Benjamin Otte [Tue, 5 Apr 2011 17:56:00 +0000 (19:56 +0200)]
cssprovider: Store cssprovider in scanner's user data
Cosimo Cecchi [Tue, 17 May 2011 03:09:07 +0000 (23:09 -0400)]
treeview: don't arbitrairly add 2 to the expander size
Bump the default expander size by 2 pixels instead.
https://bugzilla.gnome.org/show_bug.cgi?id=650424
Cosimo Cecchi [Tue, 17 May 2011 03:03:09 +0000 (23:03 -0400)]
treeview: render a frame around the rows, after drawing their background
https://bugzilla.gnome.org/show_bug.cgi?id=650424
Cosimo Cecchi [Wed, 18 May 2011 14:42:10 +0000 (10:42 -0400)]
raleigh: clear up menu handling in the fallback CSS
Now that menus properly respect padding/border, this is not needed
anymore.
Cosimo Cecchi [Tue, 17 May 2011 18:10:19 +0000 (14:10 -0400)]
menu: don't use the border as a padding value
Borders should be rendered inside the allocation, not act as a second
padding.
https://bugzilla.gnome.org/show_bug.cgi?id=650418
Cosimo Cecchi [Tue, 17 May 2011 18:20:31 +0000 (14:20 -0400)]
all: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
https://bugzilla.gnome.org/show_bug.cgi?id=650420
Chun-wei Fan [Wed, 18 May 2011 04:02:10 +0000 (12:02 +0800)]
Update Visual C++ README.txt
-Make the build preparation instructions a bit more clear.
-Tell people about the (now optional) use of fontconfig in the
Visual C++ builds.
Carlos Garnacho [Tue, 17 May 2011 11:12:26 +0000 (13:12 +0200)]
button: Fix typo in keyboard grab's evmask
https://bugzilla.gnome.org/show_bug.cgi?id=650382, spotted
by Alexander Larsson.
Colin Walters [Tue, 16 Nov 2010 15:58:58 +0000 (10:58 -0500)]
Explicitly declare internal reserved bits in GdkModifierType
XKB and GDK both add "internal" bits to GdkModifierType. In C,
this typically doesn't cause problems as bitfields are just integers,
and there's no validation. However for bindings, it's normal to
convert enumerations to "native" enumeration types, which don't
support unknown bits. See bug 597292.
https://bugzilla.gnome.org/show_bug.cgi?id=634994
Colin Walters [Mon, 16 May 2011 16:21:34 +0000 (12:21 -0400)]
gdk_display_get_pointer: Screen out parameter is (transfer none)
Yaron Shahrabani [Fri, 13 May 2011 05:28:50 +0000 (08:28 +0300)]
Update Hebrew translation.
Yaron Shahrabani [Fri, 13 May 2011 05:26:01 +0000 (08:26 +0300)]
Update Hebrew translation.
Benjamin Otte [Fri, 13 May 2011 00:41:21 +0000 (02:41 +0200)]
reftests: Add a shell script to create tests
See the documentation in the script.
Tests are not yet added as the output from the 2 included scripts
doesn't match and the intended reference output first needs to be agreed
on.
Matthias Clasen [Fri, 13 May 2011 00:12:51 +0000 (20:12 -0400)]
Add shortcuts for the !children case
Not that we are doing too much work in that case, but we are
segfaulting, which is bad.
https://bugzilla.gnome.org/show_bug.cgi?id=649972
Matthias Clasen [Thu, 12 May 2011 13:14:23 +0000 (09:14 -0400)]
Flesh out the GtkGrid migration chapter some more
Benjamin Otte [Thu, 12 May 2011 21:38:41 +0000 (23:38 +0200)]
reftests: Add a test for the label fix
Benjamin Otte [Thu, 12 May 2011 21:27:51 +0000 (23:27 +0200)]
themingengine: Set current point to 0,0 when rendering rotated layout
Otherwise the layout may move to who-knows-where
Matthias Clasen [Thu, 12 May 2011 03:55:54 +0000 (23:55 -0400)]
Add an initial migration chapter for GtkGrid
Matthias Clasen [Wed, 11 May 2011 23:51:26 +0000 (19:51 -0400)]
Another grid spacing reftest
This one checks that empty rows/columns don't affect layout.
Micah Carrick [Wed, 11 May 2011 20:14:14 +0000 (16:14 -0400)]
Fix annotation for Gtk.TreeView.enable_model_drag_source
https://bugzilla.gnome.org/show_bug.cgi?id=649979
Matthias Clasen [Wed, 11 May 2011 17:48:00 +0000 (13:48 -0400)]
Add some reftests comparing aspects of grid and box spacing
Benjamin Otte [Tue, 10 May 2011 22:46:08 +0000 (00:46 +0200)]
paned: Be careful about showing windows
The previous code failed to account for all child visibility and paned
mapedness invariants which could cause stray GDK windows to appear.
Not good.
Credit goes to Xan for triggering it.
Matthias Clasen [Tue, 10 May 2011 21:57:21 +0000 (17:57 -0400)]
GtkAssistant: make the content expand
Its all about the content, so make sure the content fills
the available space.
Friedel Wolff [Tue, 10 May 2011 10:44:33 +0000 (12:44 +0200)]
Fix two small translation bugs
Benjamin Otte [Mon, 9 May 2011 23:25:26 +0000 (01:25 +0200)]
reftests: Add test for undersized children of GtkPaned
Tests the recent fixes done in
206b9f940d632dd0ed10ab8046777956872555eb
and
6bda6f0c580cbdc5d154bb8e249260d1cdc1b88b
Matej Urbančič [Mon, 9 May 2011 18:22:00 +0000 (20:22 +0200)]
Updated Slovenian translation
Jorge González [Mon, 9 May 2011 17:39:39 +0000 (19:39 +0200)]
Updated Spanish translation
Benjamin Otte [Mon, 9 May 2011 16:55:13 +0000 (18:55 +0200)]
paned: Ensure children aren't underallocated
Instead, allocate them a proper size and just clip them using the window
we added for them in the last commit.
Benjamin Otte [Mon, 9 May 2011 14:19:06 +0000 (16:19 +0200)]
paned: Create a GDK window for every child
We need the window to clip drawing. Otherwise we cannot allow
undersizing without doing underallocations.
Benjamin Otte [Mon, 9 May 2011 11:23:52 +0000 (13:23 +0200)]
reftests: Add CSS file for alignment test
We need to force arrow scaling to 1.0 to get the alignment right.
John Stowers [Mon, 9 May 2011 10:43:30 +0000 (22:43 +1200)]
Add missing gtk_widget_override_* annotations
https://bugzilla.gnome.org/show_bug.cgi?id=649779
Fran Diéguez [Mon, 9 May 2011 11:08:53 +0000 (13:08 +0200)]
Updated Galician translations
Matthias Clasen [Mon, 9 May 2011 01:33:12 +0000 (21:33 -0400)]
Dueling arrow positioning fixes...
Revert my fix, which conflicted with Benjamins fix for the same
issue.
Matthias Clasen [Mon, 9 May 2011 01:24:21 +0000 (21:24 -0400)]
Fix up the misc-alignment test
The new-style ui file had some left-over GtkMisc properties
in it.
Matthias Clasen [Mon, 9 May 2011 01:16:05 +0000 (21:16 -0400)]
Fix a arrow positioning
This gets the misc-alignment test for arrows closer to
not failing.
Benjamin Otte [Sun, 8 May 2011 23:15:17 +0000 (01:15 +0200)]
reftests: Modify test to ensure identical output
GtkArrow and the align properties use different methods (float vs int)
to center the arrow. If the size of the arrow is odd, this will cause a
rendering that differs by half a pixel. So we request an even size for
both the arrow and the container and everything works out.
Benjamin Otte [Sun, 8 May 2011 23:12:29 +0000 (01:12 +0200)]
reftests: Add misc-alignment test to Makefile
Benjamin Otte [Sun, 8 May 2011 23:09:01 +0000 (01:09 +0200)]
reftests: Actually add toplevel vs popup testcase
Adds missing files from
79d1b11d0b3975c4927cd0f56c77aedd0933cb74 and
reverts
eba4ca3e660b90470418a0340c46cbb1b0db546c.
Benjamin Otte [Sun, 8 May 2011 23:06:54 +0000 (01:06 +0200)]
arrow: Don't include padding in computation of alignment
Kristian Høgsberg [Sun, 8 May 2011 17:19:54 +0000 (13:19 -0400)]
wayland: Track wayland API changes
Jorge González [Sun, 8 May 2011 15:54:29 +0000 (17:54 +0200)]
Updated Spanish translation
Daniel Mustieles [Sun, 8 May 2011 15:33:59 +0000 (17:33 +0200)]
Updated Spanish translation
Daniel Mustieles [Sun, 8 May 2011 15:30:08 +0000 (17:30 +0200)]
Updated Spanish translation
Matthias Clasen [Sat, 7 May 2011 17:04:38 +0000 (13:04 -0400)]
Post-release bump
Matthias Clasen [Sat, 7 May 2011 17:01:16 +0000 (13:01 -0400)]
3.1.4
Matthias Clasen [Sat, 7 May 2011 17:00:58 +0000 (13:00 -0400)]
Another distcheck fix
Matthias Clasen [Sat, 7 May 2011 16:59:09 +0000 (12:59 -0400)]
Work around testsuite failures for distcheck